home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #047 (1990)(Amiga User Group Deutschland e.V.)[v Disaster Master 2].zip / Franz PD Disk #047 (1990)(Amiga User Group Deutschland e.V.)[v Disaster Master 2].adf / A68K_Beispiele / dump.asm < prev    next >
Assembly Source File  |  1989-07-02  |  48KB  |  1,515 lines

  1. ***************************************
  2. *                                     *
  3. *        DUMP memory contents         *
  4. *                                     *
  5. * written by E. Lenz                  *
  6. *            Johann-Fichte-Strasse 11 *
  7. *            8 Munich 40              *
  8. *            Germany                  *
  9. *                                     *
  10. ***************************************
  11.  
  12.  
  13.  
  14. *****************************************************
  15. *               The FIND function
  16. * The find function is rather slow and cannot be
  17. * stopped (try searching 16MB) but it searches all of
  18. * memory (excepting the RTC and custom chip areas:
  19. * $C80000 - $D7FFFF and $DC0000 - $DFFFFF )
  20. * so nothing can be hidden. Although my Buffer will
  21. * not be found by find, it always finds a replica
  22. * used by DOS.
  23. *****************************************************
  24.  
  25.  XREF Disasm1,file,load
  26.  
  27. ; EXEC.library routines
  28.  
  29. _AbsExecBase       equ 4
  30. _LVOForbid         equ -$84
  31. _LVOPermit         equ -$8a
  32. _LVOAllocMem       equ -$c6
  33. _LVOFreeMem        equ -$d2
  34. _LVOWait           equ -$13e
  35. _LVOGetMsg         equ -$174
  36. _LVOReplyMsg       equ -$17a
  37. _LVOWaitPort       equ -$180
  38. _LVOCloseLibrary   equ -$19e
  39. _LVOOpenLibrary    equ -$228
  40.  
  41. ; GRAPHICS.library routines
  42.  
  43. _LVOText           equ -$3c
  44. _LVOMove           equ -$f0
  45.  
  46. ; INTUITION.library routines
  47.  
  48. _LVOClearMenuStrip equ -$36
  49. _LVOCloseWindow    equ -$48
  50. _LVOOpenWindow     equ -$cc
  51. _LVOSetMenuStrip   equ -$108
  52. _LVOBeginRefresh   equ -$162
  53. _LVOEndRefresh     equ -$16e
  54.  
  55. ; DOS.library routines
  56.  
  57. _LVOOpen         equ -$1e
  58. _LVOClose        equ -$24
  59. _LVORead         equ -$2a
  60. _LVOWrite        equ -$30
  61.  
  62. wd_UserPort     equ $56
  63. pr_MsgPort      equ $5c
  64. pr_CLI          equ $ac
  65. ThisTask        equ $114
  66. VBlankFrequency equ $212
  67.  
  68.              code
  69.  
  70.              movea.l _AbsExecBase,a6
  71.  
  72. ; Start from Workbench ?
  73.  
  74.              moveq   #0,d0
  75.              movea.l ThisTask(a6),a4
  76.              tst.l   pr_CLI(a4)
  77.              bne.s   OpenLibs   Not from WB
  78.  
  79. ; Get WB Message
  80.  
  81.              lea     pr_MsgPort(a4),a0
  82.              jsr     _LVOWaitPort(a6)
  83.              jsr     _LVOGetMsg(a6)
  84.  
  85.  
  86. ; Open librarys
  87.  
  88.  
  89. OpenLibs     move.l  d0,-(a7)
  90.  
  91.              cmpi.b  #60,VBlankFrequency(a6) test if PAL or NTSC
  92.              beq.s   isNTSC
  93.              move.w  #256,NewWindow+6
  94.  
  95. isNTSC       lea     GfxName(pc),a1   Open graphics.library
  96.              moveq   #0,d0
  97.              jsr     _LVOOpenLibrary(a6)
  98.              move.l  d0,GfxBase   Save graphics base address
  99.              beq.s   Gexit
  100.  
  101.              lea     DosName(pc),a1    Open dos.library
  102.              moveq   #0,d0
  103.              jsr     _LVOOpenLibrary(a6)
  104.              move.l  d0,DosBase
  105.              beq.s   Gexit
  106.  
  107.              lea     IntuitionName(pc),a1 Open intuition.library
  108.              moveq   #0,d0
  109.              jsr     _LVOOpenLibrary(a6)
  110.              move.l  d0,IntuitionBase Save intuition base address
  111.              beq.s   Gexit
  112.  
  113. ; Open window
  114.  
  115.              movea.l d0,a6         Base address = IntuitionBase
  116.              lea     NewWindow(pc),a0
  117.              jsr     _LVOOpenWindow(a6)
  118.              move.l  d0,Window  Save pointer to window structure
  119. Gexit        beq     exit
  120.  
  121. ; Set menu
  122.              movea.l d0,a0           which window
  123.              lea     Menu1(pc),a1    which menu
  124.              jsr     _LVOSetMenuStrip(a6)
  125.  
  126. ; Initial output
  127.  
  128.              move.w  #0,Micro
  129.              move.w  #10,Times        Initialize page multiplier
  130.              move.w  #10,Wordl        Initialize word multiplier
  131.              move.l  #$fc0000,MemAdr  Initialize MemAdr
  132.              bsr     PrintMem
  133.              movea.l _AbsExecBase,a6
  134.  
  135. ; get disk buffer
  136.  
  137.              move.l  #$420,d0
  138.              moveq   #2,d1
  139.              jsr     _LVOAllocMem(a6)
  140.              move.l  d0,diskbuff
  141.              beq.s   Gexit
  142.  
  143. ; Main program
  144.  
  145. Main         movea.l Window(pc),a0
  146.              movea.l wd_UserPort(a0),a0
  147.              move.b  $f(a0),d1   Load signal bit
  148.              moveq   #1,d0
  149.              lsl.l   d1,d0
  150.              jsr     _LVOWait(a6)
  151.  
  152. MsgLoop      movea.l _AbsExecBase,a6
  153.              movea.l Window(pc),a0
  154.              movea.l wd_UserPort(a0),a0
  155.              jsr     _LVOGetMsg(a6)
  156.              tst.l   d0
  157.              beq.s   Main          No message
  158.  
  159.              movea.l d0,a1
  160.              move.l  $14(a1),d7       Message in a7
  161.              jsr     _LVOReplyMsg(a6) Always reply
  162.              movea.l IntuitionBase,a6
  163.  
  164.  
  165.              cmpi.l  #4,d7       Refresh window
  166.              bne.s   Gadget
  167.  
  168. ;Refresh window
  169.  
  170.              movea.l Window(pc),a0
  171.              jsr     _LVOBeginRefresh(a6)
  172.              bsr     PrintMem
  173.              movea.l Window(pc),a0
  174.              moveq   #1,d0
  175.              jsr     _LVOEndRefresh(a6)
  176.              bra.s   MsgLoop
  177.  
  178. ; Gadgets selected
  179.  
  180. Gadget       cmpi.l  #$40,d7
  181.              bne     MenuPick
  182.  
  183.              movea.l Window(pc),a0
  184.              movea.l $5e(a0),a0   Load Window.MessageKey
  185.              movea.l $1c(a0),a0   Load pointer to Gadget
  186.              move.w  $26(a0),d0   Load gadget ID
  187.              move.l  Number(pc),d1
  188.  
  189.              tst.w   gagsec
  190.              beq.s   ismem
  191.              cmpi.w  #3,d0
  192.              bge.s   ismem
  193.              bsr     Gsec
  194.              bra.s   Fresh
  195.  
  196. ismem        cmpi.w  #1,d0
  197.              beq.s   Fresh2       Gadget #1 -> page down
  198.  
  199.              cmpi.w  #2,d0
  200.              beq.s   Fresh3       Gadget #2 -> page back
  201.  
  202.              move.w  Times(pc),d1
  203.              move.l  Number(pc),d2
  204.              mulu    d2,d1
  205.              cmpi.w  #3,d0        Gadget #3 -> forwards # pages
  206.              bne.s   gag4
  207. Fresh2       move.l  MemAdr(pc),d0
  208.              add.l   d1,d0
  209.              bra.s   Fresh1
  210.  
  211. gag4         cmpi.w  #4,d0
  212.              bne.s   gag5
  213. Fresh3       move.l  MemAdr(pc),d0 Gadget #4 -> back # pages
  214.              sub.l   d1,d0
  215. Fresh1       move.l  d0,MemAdr
  216. Fresh        bsr     PrintMem
  217.              bra     MsgLoop
  218.  
  219. gag5         moveq   #2,d1        Gadget #5 -> Word forward
  220.              cmpi.w  #5,d0
  221.              beq.s   Fresh3
  222.  
  223.              cmpi.w  #6,d0        Gadget #6 -> Word backwards
  224.              beq.s   Fresh2
  225.  
  226.              move.w  Wordl(pc),d1
  227.              lsl.w   #1,d1
  228.              cmpi.w  #7,d0
  229.              beq.s   Fresh3       Gadget #7 -> # words forward
  230.              bne.s   Fresh2
  231.  
  232.  
  233. MenuPick     cmpi.l  #$100,d7
  234.              bne     CloseWindow
  235.  
  236. ; Choice from menu
  237.  
  238.              movea.l Window(pc),a0
  239.              movea.l $5e(a0),a0   Load Window.MessageKey
  240.              move.w  $18(a0),d0   Load message code
  241.              move.w  d0,d1
  242.              andi.w  #$f,d1
  243.              bne.s   ismenu2
  244.  
  245.              andi.w  #$f0,d0      Menu 1 set flag
  246.              move.w  d0,AHFlag
  247. Gfresh       bra.s   Fresh
  248.  
  249. ismenu2      cmpi.w  #1,d1
  250.              bne.s   ismenu3
  251.              move.w  d0,d1
  252.              andi.w  #$f0,d0      Menu 2
  253.              bne.s   menu22
  254.              bsr     GetAddress   Submenu 1
  255.              bra.s   Gfresh
  256. menu22       cmpi.w  #$20,d0
  257.              bne.s   menu23
  258.              bsr     GetPage      Submenu 2
  259.              bra.s   Gfresh
  260. menu23       cmpi.w  #$40,d0
  261.              bne.s   menu24
  262.              bsr     Sword        Submenu 3
  263.              bra.s   Gfresh
  264. menu24       cmpi.w  #$60,d0
  265.              bne.s   menu25
  266.              bsr     Find         Submenu 4
  267.              bra.s   Gfresh
  268. menu25       cmpi.w  #$80,d0
  269.              bne.s   menu26
  270.              bsr     Change       Submenu 5
  271.              bra.s   Gfresh
  272. menu26       cmpi.w  #$a0,d0
  273.              bne.s   Gfresh
  274.              cmpi.w  #$a1,d1      Submenu 6
  275.              bne.s   m1
  276.              moveq   #0,d0        6.1 68000
  277.              bra.s   ismic
  278. m1           cmpi.w  #$8a1,d1
  279.              bne.s   m2
  280.              moveq   #1,d0        6.2 68010
  281.              bra.s   ismic
  282. m2           moveq   #2,d0        6.3 68020
  283. ismic        move.w  d0,Micro
  284. Xfresh       bra.s   Gfresh
  285.  
  286. ismenu3      cmpi.w  #2,d1         Menu 3
  287.              bne.s   GMsg
  288.              andi.w  #$f0,d0
  289.              bne.s   menu32
  290.              bsr     loads         Submenu 1
  291.              bra.s   Xfresh
  292. menu32       cmpi.w  #$20,d0
  293.              bne.s   menu33
  294.              move.w  Menflg(pc),d0 Submenu 2
  295.              andi.w  #$100,d0
  296.              move.w  d0,gagsec
  297. GMsg         bra     MsgLoop
  298. menu33       cmpi.w  #$40,d0
  299.              bne.s   GMsg
  300.              bsr     Loadf         Submenu 3
  301.              bra.s   Xfresh
  302.  
  303. CloseWindow  cmpi.l  #$200,d7      Close window
  304.              bne.s   GMsg
  305.  
  306. ;Window closed end program
  307.  
  308.              movea.l Window(pc),a0 Clear menu
  309.              jsr     _LVOClearMenuStrip(a6)
  310.  
  311.              movea.l Window(pc),a0 Close window
  312.              jsr     _LVOCloseWindow(a6)
  313.  
  314.  
  315. ;Close library
  316.  
  317. exit         movea.l _AbsExecBase,a6
  318.              move.l  diskbuff(pc),d0
  319.              beq.s   no_disk
  320.              movea.l d0,a1
  321.              move.l  #$420,d0
  322.              jsr     _LVOFreeMem(a6)
  323.  
  324. no_disk      move.l  GfxBase(pc),d0   Close graphics lib
  325.              beq.s   No_Gfx
  326.              movea.l d0,a1
  327.              jsr     _LVOCloseLibrary(a6)
  328.  
  329. No_Gfx       move.l  IntuitionBase(pc),d0 Close intuition lib
  330.              beq.s   No_Intui
  331.              movea.l d0,a1
  332.              jsr     _LVOCloseLibrary(a6)
  333.  
  334. No_Intui     move.l  DosBase(pc),d0    Close dos lib
  335.              beq.s   No_Dos
  336.              movea.l d0,a1
  337.              jsr     _LVOCloseLibrary(a6)
  338.  
  339. No_Dos       move.l  (a7)+,d0
  340.              beq.s   Nbench
  341.  
  342.              jsr     _LVOForbid(a6)
  343.              movea.l d0,a1
  344.              jsr     _LVOReplyMsg(a6)  Reply to WB
  345.              jsr     _LVOPermit(a6)
  346.  
  347. Nbench       moveq   #0,d0    No errors
  348.              rts
  349.  
  350. **********
  351. * Routines
  352. **********
  353.  
  354. ; Print memory contents
  355.  
  356. PrintMem     move.l  a6,-(sp)    Save old base address
  357.              move.l  MemAdr(pc),temp initialize memory address
  358.              movea.l GfxBase(pc),a6  Base address = graphics base
  359.              movea.l Window(pc),a4
  360.              movea.l $32(a4),a5
  361.              moveq   #8,d7        y start
  362. prloop       moveq   #0,d0        x pos = 0
  363.              move.l  d7,d1        y pos
  364.              movea.l a5,a1        rastport
  365.              jsr     _LVOMove(a6)    set cursor
  366.  
  367.              cmpi.w  #$40,AHFlag
  368.              beq.s   Disassem
  369.              bsr.s   convert      write into buffer
  370.              bra.s   Print
  371.  
  372. Disassem     move.l  temp(pc),Begin
  373.              move.l  temp(pc),RelAddr
  374.              lea     Begin(pc),a0
  375.              jsr     Disasm1
  376.              move.l  Begin(pc),temp
  377.  
  378. Print        lea     Buffer(pc),a0
  379.              moveq   #80,d0
  380.              movea.l a5,a1
  381.              jsr     _LVOText(a6)  print line
  382.              addq.b  #8,d7         increment y
  383.              move.w  d7,d0
  384.              addi.w  #$20,d0     can we print another line?
  385.              cmp.w   $a(a4),d0
  386.              blt.s   prloop
  387.              move.l  temp(pc),d0
  388.              sub.l   MemAdr(pc),d0
  389.              move.l  d0,Number
  390.              movea.l (sp)+,a6    restore base address
  391.              rts
  392.  
  393. ; Convert memory content to readable
  394.  
  395. convert      movea.l temp(pc),a0       Begin of memory
  396.              lea     Buffer(pc),a1     Begin of buffer
  397.              lea     Buffer+43(pc),a2  Ascii display in buffer
  398.              move.b  #$20,(a2)+        Space between hex + ASCII
  399.              bsr.s   start
  400.  
  401.              tst.w   AHFlag
  402.              bne.s   Ascii
  403.  
  404.              moveq   #$f,d2         Bytes per line
  405. cloop        move.b  d2,d3
  406.              andi.b  #3,d3
  407.              cmpi.b  #3,d3
  408.              bne.s   noblnk
  409.              moveq   #$20,d3        Space after long word
  410.              move.b  d3,(a1)+
  411. noblnk       move.b  (a0)+,d0       get byte
  412.              move.b  d0,d1
  413.              cmpi.b  #$20,d1
  414.              bge.s   isok
  415.              moveq   #$2e,d1
  416. isok         move.b  d1,(a2)+       write ASCII
  417.              bsr.s   byte4          write hex
  418.              dbeq    d2,cloop
  419.              movea.l a2,a1
  420. aend         move.l  a0,temp        Increment address
  421.              moveq   #19,d0
  422.              moveq   #$20,d1
  423. clop         move.b  d1,(a1)+
  424.              dbra    d0,clop
  425.              rts
  426.  
  427. ; Memory output ASCII
  428.  
  429. Ascii        moveq   #$34,d2
  430. aloop        move.b  (a0)+,d0
  431.              cmpi.b  #$20,d0
  432.              bge.s   nocor
  433.              moveq   #'.',d0
  434. nocor        move.b  d0,(a1)+
  435.              dbeq    d2,aloop
  436.              bra.s   aend
  437.  
  438. ; Write start address
  439.  
  440. start        move.l  a0,d0
  441.              swap    d0
  442.              bsr.s   byte4          1st byte of address
  443.              move.l  a0,d0
  444.              lsr.w   #8,d0
  445.              bsr.s   byte4          2nd byte of address
  446.              move.l  a0,d0
  447.              bsr.s   byte4          3rd byte of address
  448.              move.b  #':',(a1)+
  449.              rts
  450.  
  451. ; Convert byte to ASCII and write into buffer
  452.  
  453. byte4        move.b  d0,d1          save byte
  454.              lsr.b   #4,d0          high half byte
  455.              bsr.s   byte3
  456.              move.b  d1,d0          restore byte
  457.  
  458. ; Convert half byte to ASCII and write into buffer
  459.  
  460. byte3        andi.b  #$f,d0         take lower half byte
  461.              addi.b  #$30,d0        convert to "0" - "9"
  462.              cmpi.b  #$3a,d0        above "9"?
  463.              blt.s   ncor
  464.              addq.b  #7,d0          convert to "A" - "F"
  465. ncor         move.b  d0,(a1)+       write into buffer
  466.              rts
  467.  
  468. ; Console handler
  469.  
  470. ConWind      movea.l DosBase(pc),a6
  471.              move.l  d5,d1
  472.              move.l  #$3ed,d2      Open for read + write
  473.              jsr     _LVOOpen(a6)
  474.              move.l  d0,ConHandle
  475.              beq.s   nocon
  476.  
  477.              move.l  d0,d1
  478.              move.l  d6,d2
  479.              move.l  d7,d3
  480.              jsr     _LVOWrite(a6)
  481.  
  482.              move.l  ConHandle(pc),d1
  483.              move.l  #Buffer,d2
  484.              moveq   #60,d3
  485.              jsr     _LVORead(a6)
  486.  
  487.              move.l  ConHandle(pc),d1
  488.              jsr     _LVOClose(a6)
  489. nocon        rts
  490.  
  491. *** Get start address ***
  492.  
  493. GetAddress   move.l  #cname,d5
  494.              move.l  #ctext,d6
  495.              moveq   #cend-ctext,d7
  496.              bsr.s   ConWind
  497.  
  498. ; Write new memory address
  499.  
  500.              bsr.s   Reconvert
  501.              bne.s   nmem
  502.              move.l  d1,MemAdr
  503. nmem         rts
  504.  
  505. *** Get page multiplier ***
  506.  
  507. GetPage      move.l  #pname,d5
  508.              move.l  #ptext,d6
  509.              moveq   #pend-ptext,d7
  510.              bsr.s   ConWind
  511.  
  512. ; Write new page multiplier
  513.  
  514.              bsr.s   Reconvert
  515.              bne.s   nopage
  516.              move.w  d1,Times
  517. nopage       rts
  518.  
  519. *** Get word multiplier ***
  520.  
  521. Sword        move.l  #wname,d5
  522.              move.l  #wtext,d6
  523.              moveq   #wend-wtext,d7
  524.              bsr     ConWind
  525.  
  526. ; Write new word multiplier
  527.  
  528.              bsr.s   Reconvert
  529.              bne.s   noword
  530.              move.w  d1,Wordl
  531. noword       rts
  532.  
  533. ; Convert input to Hex
  534.  
  535. Reconvert    moveq   #0,d0
  536.              moveq   #0,d2
  537.              lea     Buffer(pc),a0
  538.              moveq   #0,d1
  539.              move.b  (a0)+,d0
  540.              cmpi.b  #'$',d0    First char $?
  541.              bne.s   read1      then ignore
  542.  
  543. readbuf      move.b  (a0)+,d0   Get next char
  544. read1        cmpi.b  #$a,d0     End of input?
  545.              beq.s   readend
  546.              addq.l  #1,d2
  547.              subi.b  #$30,d0    Convert to hex
  548.              blt.s   nogo       Error in input
  549.              cmpi.b  #9,d0
  550.              ble.s   risok       0..9 ok
  551.              cmpi.b  #16,d0
  552.              ble.s   nogo        :..§ not ok
  553.              subq.b  #7,d0
  554.              cmpi.b  #15,d0
  555.              ble.s   risok       A..F ok
  556.              subi.b  #$20,d0
  557.              blt.s   nogo        G..  notok
  558.              cmpi.b  #15,d0
  559.              bgt.s   nogo        a..f ok
  560. risok        lsl.l   #4,d1
  561.              add.l   d0,d1
  562.              bra.s   readbuf
  563.  
  564. nogo         moveq   #1,d0      Nogood
  565.              rts
  566. readend      tst.l   d2
  567.              beq.s   nogo       No input
  568.              moveq   #0,d0      Is ok
  569.              rts
  570.  
  571. ; Find memory pattern
  572.  
  573. Find         move.l  #fname,d5
  574.              move.l  #ftext,d6
  575.              moveq   #fend-ftext,d7
  576.              bsr     ConWind
  577.  
  578. ; See what you can find
  579.  
  580.              movem.l d2-d7,-(a7)
  581.              lea     Buffer(pc),a0  Find length of string
  582.              moveq   #-1,d3
  583. leng         addq.l  #1,d3
  584.              cmpi.b  #$a,(a0)+
  585.              bne.s   leng
  586.              tst.l   d3         String of length 0?
  587.              beq     nofind
  588.  
  589.              cmpi.b  #'$',Buffer First char $?
  590.              bne.s   nodoll
  591.              bsr     Reconvert   First convert to hex
  592.              bne.s   nofind
  593.              move.l  d1,Buffer
  594.              moveq   #4,d3
  595.  
  596. nodoll       move.l  MemAdr(pc),d0
  597.              move.l  d0,d1
  598.              move.l  #Buffer,d2
  599.              move.l  #$c80000,d4
  600.              move.l  #$dc0000,d5
  601.              sub.l   d3,d4
  602.              sub.l   d3,d5
  603.  
  604. ; d0 = current memory address
  605. ; d1 = begin of search
  606. ; d2 = begin of buffer
  607. ; d3 = length of string
  608. ; d4 = 1st custom chip area
  609. ; d5 = 2nd custom chip area
  610. ; d6 = number of corresponding characters
  611.  
  612. findloop     addq.l  #1,d0        Increment address
  613.              andi.l  #$ffffff,d0     mod 16KB
  614.  
  615.              cmp.l   d1,d0       End of search?
  616.              beq.s   nofind      Not found
  617.  
  618.              cmp.l   d2,d0       Begin of buffer?
  619.              bne.s   custom
  620.              add.l   d3,d0       Set to end of buffer
  621.  
  622. custom       cmp.l   d4,d0       Custom chips?
  623.              bne.s   nofirst
  624.              move.l  #$d80000,d0 Jump over custom chips
  625.  
  626. nofirst      cmp.l   d5,d0       Custom chips?
  627.              bne.s   find1
  628.              move.l  #$e00000,d0 Jump over rtc + custom chips
  629.  
  630. find1        moveq   #0,d6     Number of corresponding chars
  631.              move.l  d2,a0     Begin of find string
  632.              move.l  d0,a1     Begin of memory
  633. inner        cmpm.b  (a0)+,(a1)+
  634.              bne.s   findloop  No correspondence
  635.              addq.l  #1,d6     Inc number of found chars
  636.              cmp.l   d6,d3     Was that all?
  637.              bne.s   inner
  638.  
  639.              move.l  d0,MemAdr String found
  640.  
  641. nofind       movem.l (a7)+,d2-d7
  642.  
  643. nof1         rts
  644.  
  645. ; Change memory
  646.  
  647. Change       movea.l MemAdr(pc),a0   Write start address
  648.              lea     haddress(pc),a1
  649.              bsr     start
  650.  
  651.              move.l  #hname,d5
  652.              move.l  #htext,d6
  653.              moveq   #hend-htext,d7
  654.              bsr     ConWind
  655.              bsr     Reconvert
  656.              bne.s   nochange
  657.              movea.l MemAdr(pc),a0
  658.              move.l  d1,(a0)
  659.              rts
  660.  
  661. ; Load file
  662.  
  663. Loadf        move.l  #lname,d5
  664.              move.l  #ltext,d6
  665.              moveq   #lend-ltext,d7
  666.              bsr     ConWind
  667.              lea     Buffer(pc),a0
  668.              movea.l a0,a1
  669.              moveq   #-1,d0
  670. flop         addq.l  #1,d0
  671.              cmpi.b  #$a,(a1)+
  672.              bne.s   flop
  673.              tst.l   d0
  674.              beq.s   nochange
  675.              move.b  #0,-(a1)
  676.              jsr     file
  677.              tst.l   d7
  678.              bne.s   nochange
  679.              move.l  a3,MemAdr
  680. nochange     rts
  681.  
  682. ; Load sector
  683.  
  684. loads        move.l  #jname,d5
  685.              move.l  #jtext,d6
  686.              moveq   #jend-jtext,d7
  687.              bsr     ConWind
  688.              bsr     Reconvert
  689.              bne.s   nochange
  690. loadss       move.l  d1,secnum
  691.              lea     Buffer(pc),a0
  692.              move.l  diskbuff(pc),d0
  693.              move.l  Unitno(pc),d2
  694.              jsr     load
  695.              adda.l  a0,a0
  696.              beq.s   nochange
  697.              move.l  diskbuff(pc),MemAdr
  698.              rts
  699.  
  700. ; Get next sector
  701.  
  702. Gsec         move.l  secnum(pc),d1
  703.              cmpi.w  #1,d0
  704.              bne.s   subt
  705.              addq.l  #2,d1
  706.              bra.s   gogo
  707. subt         subq.l  #2,d1
  708. gogo         movea.l d1,a0
  709.              move.l  d1,d7
  710.              lea     Buffer(pc),a1
  711.              bsr     start
  712.              move.b  #$a,-(a1)
  713.              move.l  d7,d1
  714.              bra.s   loadss
  715.  
  716. IntuitionBase    ds.l 1        Pointer to intuition base
  717. GfxBase          ds.l 1        Pointer to graphics base
  718. DosBase          ds.l 1        Pointer to dos base
  719. Window           ds.l 1        Pointer to window structure
  720. diskbuff         ds.l 1        Pointer to disk buffer
  721. gagsec           ds.w 1        Lock gagdets to sector mode
  722. secnum           ds.l 1        sector number
  723. Unitno           dc.l 0        Unit number
  724.  
  725. cname            dc.b 'CON:100/100/200/90/Start address',0
  726.                  even
  727. ctext            dc.b 'New start address',$d,$a
  728. cend:
  729.                  even
  730.  
  731. pname            dc.b 'CON:100/100/200/90/Page multiplier',0
  732.                  even
  733.  
  734. ptext            dc.b 'New page multiplier',$d,$a
  735. pend:
  736.                  even
  737.  
  738. wname            dc.b 'CON:100/100/200/90/Word multiplier',0
  739.                  even
  740.  
  741. wtext            dc.b 'New word multiplier',$d,$a
  742. wend:
  743.                  even
  744.  
  745. fname            dc.b 'CON:100/100/200/90/'
  746. item24txt        dc.b 'Find',0
  747.                  even
  748.  
  749. ftext            dc.b 'Find:',$d,$a,'$...HEX pattern'
  750.                  dc.b $d,$a,'else ASCII pattern',$d,$a
  751. fend:
  752.                  even
  753.  
  754. hname            dc.b 'CON:100/100/200/90/'
  755. item25txt        dc.b 'Change',0
  756.                  even
  757.  
  758. htext            dc.b 'Change '
  759. haddress         dc.b 'FFFFFF:',$d,$a
  760. hend:
  761.                  even
  762.  
  763. jname            dc.b 'CON:100/100/200/90/'
  764. item31txt        dc.b 'Sector',0
  765.                  even
  766.  
  767. jtext            dc.b 'Sector',$d,$a
  768. jend:
  769.                  even
  770.  
  771. lname            dc.b 'CON:100/100/200/90/'
  772. item33txt        dc.b 'Load',0
  773.                  even
  774.  
  775. ltext            dc.b 'Load',$d,$a
  776. lend:
  777.                  even
  778.  
  779. ; Communication structure
  780.  
  781. Begin        ds.l 1            Begin of disassembly
  782. RelAddr      ds.l 1            Relative address
  783. Micro        ds.w 1            Microprocessor type
  784. OpCode       ds.w 1            Opcode translation
  785. Type1        ds.w 1            Type of 1st operand
  786. Len1         ds.w 1            Length of 1st address
  787. Addr1        ds.l 1            1st address
  788. Type2        ds.w 1            Type of 2nd operand
  789. Len2         ds.w 1            Length of 2nd operand
  790. Addr2        ds.l 1            2nd address
  791. Total        ds.w 1            Total no of bytes
  792. Buffer       ds.b 20           Output buffer
  793.  
  794. ; Once the libraries have been opened the texts are no longer
  795. ; needed so the space is reused as the output buffer
  796.  
  797.  
  798. IntuitionName    dc.b 'intuition.library',0
  799.                  even
  800.  
  801. GfxName          dc.b 'graphics.library',0
  802.                  even
  803.  
  804. DosName          dc.b 'dos.library',0
  805.                  even
  806.  
  807. ; ***** Window definition *****
  808.  
  809. NewWindow        dc.w 0,0       Position left,top
  810.                  dc.w 610,199   Size width,height
  811.                  dc.b 2,1       Colors detail-,block pen
  812.                  dc.l $344      IDCMP-Flags
  813.                  dc.l $144f     Window flags
  814.                  dc.l Gadget1   ^Gadget
  815. ConHandle        dc.l 0         ^Menu check
  816.                                 ;Pointer to console handler
  817. MemAdr           dc.l Wdname    ^Window name
  818.                                 ;Memory address (PrintMem)
  819. Number           dc.l 0         ^Screen structure,
  820.                                 ;Display count (PrintMem)
  821. Wind2            dc.l 0         ^BitMap
  822.                                 ;Pointer to 2nd Window structure
  823. Times            dc.w 100       MinWidth
  824.                                 ;Page multiplier
  825. Wordl            dc.w 40        MinHeight
  826.                                 ;Word multiplier
  827. AHFlag           dc.w 640       MaxWidth
  828.                                 ;0 = Ascii + Hex  0 <> Ascii only
  829. temp             dc.w 256,1     MaxHeight,Screen type
  830.                                 ;Tempory memory address (PrintMem)
  831.  
  832. Wdname           dc.b 'Dump',0
  833.                  even
  834.  
  835. **** menu definition ****
  836.  
  837. Menu1            dc.l Menu2     Next menu
  838.                  dc.w 50,0      Position left edge,top edge
  839.                  dc.w 50,20     Dimensions width,height
  840.                  dc.w 1         Menu enabled
  841.                  dc.l mtext1    Text for menu header
  842.                  dc.l item11    ^First in chain
  843.                  dc.l 0,0       Internal
  844.  
  845. mtext1           dc.b 'Mode',0
  846.                  even
  847.  
  848. item11           dc.l item12    next in chained list
  849.                  dc.w 0,0       Position left edge,top edge
  850.                  dc.w 120,10    Dimensions width,height
  851.                  dc.w $52       itemtext+highcomp+itemenabled
  852.                  dc.l 0         Mutual exclude
  853.                  dc.l I11txt    Pointer to intuition text
  854.                  dc.l 0
  855.                  dc.b 0,0
  856.                  dc.l 0
  857.                  dc.w 0
  858.  
  859.  
  860. I11txt           dc.b 0         Front pen  (blue)
  861.                  dc.b 1         Back pen   (white)
  862.                  dc.b 0,0       Draw mode
  863.                  dc.w 0         Left edge
  864.                  dc.w 0         Top edge
  865.                  dc.l 0         Text font
  866.                  dc.l item11txt Pointer to text
  867.                  dc.l 0         Next text
  868.  
  869. item11txt        dc.b 'ASCII and HEX',0
  870.                  even
  871.  
  872. item12           dc.l item13    next in chained list
  873.                  dc.w 0,10      Position left edge,top edge
  874.                  dc.w 120,10    Dimensions width,height
  875.                  dc.w $52       itemtext+highcomp+itemenabled
  876.                  dc.l 0         Mutual exclude
  877.                  dc.l I12txt    Pointer to intuition text
  878.                  dc.l 0
  879.                  dc.b 0,0
  880.                  dc.l 0
  881.                  dc.w 0
  882.  
  883.  
  884. I12txt           dc.b 0         Front pen  (blue)
  885.                  dc.b 1         Back pen   (white)
  886.                  dc.b 0,0       Draw mode
  887.                  dc.w 0         Left edge
  888.                  dc.w 0         Top edge
  889.                  dc.l 0         Text font
  890.                  dc.l item12txt Pointer to text
  891.                  dc.l 0         Next text
  892.  
  893. item12txt        dc.b 'ASCII only',0
  894.                  even
  895.  
  896. item13           dc.l 0         next in chained list
  897.                  dc.w 0,20      Position left edge,top edge
  898.                  dc.w 120,10    Dimensions width,height
  899.                  dc.w $52       itemtext+highcomp+itemenabled
  900.                  dc.l 0         Mutual exclude
  901.                  dc.l I13txt    Pointer to intuition text
  902.                  dc.l 0
  903.                  dc.b 0,0
  904.                  dc.l 0
  905.                  dc.w 0
  906.  
  907.  
  908. I13txt           dc.b 0         Front pen  (blue)
  909.                  dc.b 1         Back pen   (white)
  910.                  dc.b 0,0       Draw mode
  911.                  dc.w 0         Left edge
  912.                  dc.w 0         Top edge
  913.                  dc.l 0         Text font
  914.                  dc.l item13txt Pointer to text
  915.                  dc.l 0         Next text
  916.  
  917. item13txt        dc.b 'Disassembled',0
  918.                  even
  919.  
  920.  
  921. ***** 2nd menu definition *****
  922.  
  923. Menu2            dc.l Menu3     Next menu
  924.                  dc.w 150,0     Position left edge,top edge
  925.                  dc.w 70,20     Dimensions width,height
  926.                  dc.w 1         Menu enabled
  927.                  dc.l mtext2    Text for menu header
  928.                  dc.l item21    ^First in chain
  929.                  dc.l 0,0       Internal
  930.  
  931. mtext2           dc.b 'Options',0
  932.                  even
  933.  
  934.  
  935. item21           dc.l item22    next in chained list
  936.                  dc.w 0,0       Position left edge,top edge
  937.                  dc.w 80,10     Dimensions width,height
  938.                  dc.w $52       itemtext+highcomp+itemenabled
  939.                  dc.l 0         Mutual exclude
  940.                  dc.l I21txt    Pointer to intuition text
  941.                  dc.l 0
  942.                  dc.b 0,0
  943.                  dc.l 0
  944.                  dc.w 0
  945.  
  946.  
  947. I21txt           dc.b 0         Front pen  (blue)
  948.                  dc.b 1         Back pen   (white)
  949.                  dc.b 0,0       Draw mode
  950.                  dc.w 0         Left edge
  951.                  dc.w 0         Top edge
  952.                  dc.l 0         Text font
  953.                  dc.l item21txt Pointer to text
  954.                  dc.l 0         Next text
  955.  
  956. item21txt        dc.b 'Set start',0
  957.                  even
  958.  
  959. item22           dc.l item23    next in chained list
  960.                  dc.w 0,10      Position left edge,top edge
  961.                  dc.w 80,10     Dimensions width,height
  962.                  dc.w $52       itemtext+highcomp+itemenabled
  963.                  dc.l 0         Mutual exclude
  964.                  dc.l I22txt    Pointer to intuition text
  965.                  dc.l 0
  966.                  dc.b 0,0
  967.                  dc.l 0
  968.                  dc.w 0
  969.  
  970.  
  971. I22txt           dc.b 0         Front pen  (blue)
  972.                  dc.b 1         Back pen   (white)
  973.                  dc.b 0,0       Draw mode
  974.                  dc.w 0         Left edge
  975.                  dc.w 0         Top edge
  976.                  dc.l 0         Text font
  977.                  dc.l item22txt Pointer to text
  978.                  dc.l 0         Next text
  979.  
  980. item22txt        dc.b 'Set page',0
  981.                  even
  982.  
  983. item23           dc.l item24    next in chained list
  984.                  dc.w 0,20      Position left edge,top edge
  985.                  dc.w 80,10     Dimensions width,height
  986.                  dc.w $52       itemtext+highcomp+itemenabled
  987.                  dc.l 0         Mutual exclude
  988.                  dc.l I23txt    Pointer to intuition text
  989.                  dc.l 0
  990.                  dc.b 0,0
  991.                  dc.l 0
  992.                  dc.w 0
  993.  
  994.  
  995. I23txt           dc.b 0         Front pen  (blue)
  996.                  dc.b 1         Back pen   (white)
  997.                  dc.b 0,0       Draw mode
  998.                  dc.w 0         Left edge
  999.                  dc.w 0         Top edge
  1000.                  dc.l 0         Text font
  1001.                  dc.l item23txt Pointer to text
  1002.                  dc.l 0         Next text
  1003.  
  1004. item23txt        dc.b 'Set word',0
  1005.                  even
  1006.  
  1007. item24           dc.l item25    next in chained list
  1008.                  dc.w 0,30      Position left edge,top edge
  1009.                  dc.w 80,10     Dimensions width,height
  1010.                  dc.w $52       itemtext+highcomp+itemenabled
  1011.                  dc.l 0         Mutual exclude
  1012.                  dc.l I24txt    Pointer to intuition text
  1013.                  dc.l 0
  1014.                  dc.b 0,0
  1015.                  dc.l 0
  1016.                  dc.w 0
  1017.  
  1018.  
  1019. I24txt           dc.b 0         Front pen  (blue)
  1020.                  dc.b 1         Back pen   (white)
  1021.                  dc.b 0,0       Draw mode
  1022.                  dc.w 0         Left edge
  1023.                  dc.w 0         Top edge
  1024.                  dc.l 0         Text font
  1025.                  dc.l item24txt Pointer to text
  1026.                  dc.l 0         Next text
  1027.  
  1028.  
  1029. item25           dc.l item26    next in chained list
  1030.                  dc.w 0,40      Position left edge,top edge
  1031.                  dc.w 80,10     Dimensions width,height
  1032.                  dc.w $52       itemtext+highcomp+itemenabled
  1033.                  dc.l 0         Mutual exclude
  1034.                  dc.l I25txt    Pointer to intuition text
  1035.                  dc.l 0
  1036.                  dc.b 0,0
  1037.                  dc.l 0
  1038.                  dc.w 0
  1039.  
  1040.  
  1041. I25txt           dc.b 0         Front pen  (blue)
  1042.                  dc.b 1         Back pen   (white)
  1043.                  dc.b 0,0       Draw mode
  1044.                  dc.w 0         Left edge
  1045.                  dc.w 0         Top edge
  1046.                  dc.l 0         Text font
  1047.                  dc.l item25txt Pointer to text
  1048.                  dc.l 0         Next text
  1049.  
  1050. item26           dc.l 0         next in chained list
  1051.                  dc.w 0,50      Position left edge,top edge
  1052.                  dc.w 80,10     Dimensions width,height
  1053.                  dc.w $52       itemtext+highcomp+itemenabled
  1054.                  dc.l 0         Mutual exclude
  1055.                  dc.l I26txt    Pointer to intuition text
  1056.                  dc.l 0
  1057.                  dc.b 0,0
  1058.                  dc.l item261
  1059.                  dc.w 0
  1060.  
  1061.  
  1062. I26txt           dc.b 0         Front pen  (blue)
  1063.                  dc.b 1         Back pen   (white)
  1064.                  dc.b 0,0       Draw mode
  1065.                  dc.w 0         Left edge
  1066.                  dc.w 0         Top edge
  1067.                  dc.l 0         Text font
  1068.                  dc.l item26txt Pointer to text
  1069.                  dc.l 0         Next text
  1070.  
  1071. item26txt        dc.b 'Micro',0
  1072.                  even
  1073.  
  1074.  
  1075. item261          dc.l item262   next in chained list
  1076.                  dc.w 80,0      Position left edge,top edge
  1077.                  dc.w 80,10     Dimensions width,height
  1078.                  dc.w $15b      itemtext+highcomp+itemenabled+checkit+checked
  1079.                  dc.l 6         Mutual exclude
  1080.                  dc.l I261txt   Pointer to intuition text
  1081.                  dc.l 0
  1082.                  dc.b 0,0
  1083.                  dc.l 0
  1084.                  dc.w 0
  1085.  
  1086.  
  1087. I261txt          dc.b 0          Front pen  (blue)
  1088.                  dc.b 1          Back pen   (white)
  1089.                  dc.b 0,0        Draw mode
  1090.                  dc.w 0          Left edge
  1091.                  dc.w 0          Top edge
  1092.                  dc.l 0          Text font
  1093.                  dc.l item261txt Pointer to text
  1094.                  dc.l 0          Next text
  1095.  
  1096. item261txt       dc.b '   68000',0
  1097.                  even
  1098.  
  1099. item262          dc.l item263   next in chained list
  1100.                  dc.w 80,10     Position left edge,top edge
  1101.                  dc.w 80,10     Dimensions width,height
  1102.                  dc.w $5b       itemtext+highcomp+itemenabled+checkit
  1103.                  dc.l 5         Mutual exclude
  1104.                  dc.l I262txt   Pointer to intuition text
  1105.                  dc.l 0
  1106.                  dc.b 0,0
  1107.                  dc.l 0
  1108.                  dc.w 0
  1109.  
  1110.  
  1111. I262txt          dc.b 0          Front pen  (blue)
  1112.                  dc.b 1          Back pen   (white)
  1113.                  dc.b 0,0        Draw mode
  1114.                  dc.w 0          Left edge
  1115.                  dc.w 0          Top edge
  1116.                  dc.l 0          Text font
  1117.                  dc.l item262txt Pointer to text
  1118.                  dc.l 0          Next text
  1119.  
  1120. item262txt       dc.b '   68010',0
  1121.                  even
  1122.  
  1123.  
  1124. item263          dc.l 0         next in chained list
  1125.                  dc.w 80,20     Position left edge,top edge
  1126.                  dc.w 80,10     Dimensions width,height
  1127.                  dc.w $5b       itemtext+highcomp+itemenabled+checkit
  1128.                  dc.l 3         Mutual exclude
  1129.                  dc.l I263txt   Pointer to intuition text
  1130.                  dc.l 0
  1131.                  dc.b 0,0
  1132.                  dc.l 0
  1133.                  dc.w 0
  1134.  
  1135.  
  1136. I263txt          dc.b 0          Front pen  (blue)
  1137.                  dc.b 1          Back pen   (white)
  1138.                  dc.b 0,0        Draw mode
  1139.                  dc.w 0          Left edge
  1140.                  dc.w 0          Top edge
  1141.                  dc.l 0          Text font
  1142.                  dc.l item263txt Pointer to text
  1143.                  dc.l 0          Next text
  1144.  
  1145. item263txt       dc.b '   68020',0
  1146.                  even
  1147.  
  1148. Menu3            dc.l 0         Next menu
  1149.                  dc.w 250,0     Position left edge,top edge
  1150.                  dc.w 50,20     Dimensions width,height
  1151.                  dc.w 1         Menu enabled
  1152.                  dc.l mtext3    Text for menu header
  1153.                  dc.l item31    ^First in chain
  1154.                  dc.l 0,0       Internal
  1155.  
  1156. mtext3           dc.b 'Disk',0
  1157.                  even
  1158.  
  1159. item31           dc.l item32    next in chained list
  1160.                  dc.w 0,0       Position left edge,top edge
  1161.                  dc.w 120,10    Dimensions width,height
  1162.                  dc.w $52       itemtext+highcomp+itemenabled
  1163.                  dc.l 0         Mutual exclude
  1164.                  dc.l I31txt    Pointer to intuition text
  1165.                  dc.l 0
  1166.                  dc.b 0,0
  1167.                  dc.l 0
  1168.                  dc.w 0
  1169.  
  1170.  
  1171. I31txt           dc.b 0         Front pen  (blue)
  1172.                  dc.b 1         Back pen   (white)
  1173.                  dc.b 0,0       Draw mode
  1174.                  dc.w 0         Left edge
  1175.                  dc.w 0         Top edge
  1176.                  dc.l 0         Text font
  1177.                  dc.l item31txt Pointer to text
  1178.                  dc.l 0         Next text
  1179.  
  1180. item32           dc.l item33    next in chained list
  1181.                  dc.w 0,10      Position left edge,top edge
  1182.                  dc.w 120,10    Dimensions width,height
  1183. Menflg           dc.w $5b       itemtext+highcomp+checkit+itemenabled
  1184.                  dc.l 0         Mutual exclude
  1185.                  dc.l I32txt    Pointer to intuition text
  1186.                  dc.l 0
  1187.                  dc.b 0,0
  1188.                  dc.l 0
  1189.                  dc.w 0
  1190.  
  1191. I32txt           dc.b 0         Front pen  (blue)
  1192.                  dc.b 1         Back pen   (white)
  1193.                  dc.b 0,0       Draw mode
  1194.                  dc.w 0         Left edge
  1195.                  dc.w 0         Top edge
  1196.                  dc.l 0         Text font
  1197.                  dc.l item32txt Pointer to text
  1198.                  dc.l 0         Next text
  1199.  
  1200. item32txt        dc.b '   Gags to sec',0
  1201.                  even
  1202.  
  1203. item33           dc.l 0         next in chained list
  1204.                  dc.w 0,20      Position left edge,top edge
  1205.                  dc.w 120,10    Dimensions width,height
  1206.                  dc.w $52       itemtext+highcomp+itemenabled
  1207.                  dc.l 0         Mutual exclude
  1208.                  dc.l I33txt    Pointer to intuition text
  1209.                  dc.l 0
  1210.                  dc.b 0,0
  1211.                  dc.l 0
  1212.                  dc.w 0
  1213.  
  1214. I33txt           dc.b 0         Front pen  (blue)
  1215.                  dc.b 1         Back pen   (white)
  1216.                  dc.b 0,0       Draw mode
  1217.                  dc.w 0         Left edge
  1218.                  dc.w 0         Top edge
  1219.                  dc.l 0         Text font
  1220.                  dc.l item33txt Pointer to text
  1221.                  dc.l 0         Next text
  1222.  
  1223. *** Gadget definition ***
  1224.  
  1225. Gadget1          dc.l Gadget2   +0 Next gadget
  1226.                  dc.w 10        +4 Left edge
  1227.                  dc.w -15       +6 Top edge
  1228.                  dc.w 20        +8 Width
  1229.                  dc.w 10        +A Height
  1230.                  dc.w 8         +C Flags
  1231.                  dc.w 1         +E Activation
  1232.                  dc.w 1         +10 Gadget type
  1233.                  dc.l Border1   +12 Rendered as border or image
  1234.                  dc.l 0         +16 Select render
  1235.                  dc.l 0         +1A ^Gadget text
  1236.                  dc.l 0         +1E Mutual exclude
  1237.                  dc.l 0         +22 Special info
  1238.                  dc.w 1         +26 Gadget ID
  1239.                  dc.l 0         +28 User data
  1240.  
  1241. Border1          dc.w 0         Left edge
  1242.                  dc.w 0         Top edge
  1243.                  dc.b 1,2       Front pen,back pen
  1244.                  dc.b 1,12      Draw mode,number of coord pairs
  1245.                  dc.l Pairs1    Vector coordinate pairs
  1246.                  dc.l 0         Next border
  1247.  
  1248. Pairs1           dc.w 0,0       Lines which constitute the gadget
  1249.                  dc.w 10,0
  1250.                  dc.w 10,8
  1251.                  dc.w 8,6
  1252.                  dc.w 10,8
  1253.                  dc.w 12,6
  1254.                  dc.w 10,8
  1255.                  dc.w 10,0
  1256.                  dc.w 20,0
  1257.                  dc.w 20,10
  1258.                  dc.w 0,10
  1259.                  dc.w 0,0
  1260.  
  1261. Gadget2          dc.l Gadget3   Next gadget
  1262.                  dc.w 50        Left edge
  1263.                  dc.w -15       Top edge
  1264.                  dc.w 20        Width
  1265.                  dc.w 10        Height
  1266.                  dc.w 8         Flags
  1267.                  dc.w 1         Activation
  1268.                  dc.w 1         Gadget type
  1269.                  dc.l Border2   Rendered as border or image
  1270.                  dc.l 0         Select render
  1271.                  dc.l 0         ^Gadget text
  1272.                  dc.l 0         Mutual exclude
  1273.                  dc.l 0         Special info
  1274.                  dc.w 2         Gadget ID
  1275.                  dc.l 0         User data
  1276.  
  1277. Border2          dc.w 0         Left edge
  1278.                  dc.w 0         Top edge
  1279.                  dc.b 1,2       Front pen,back pen
  1280.                  dc.b 1,12      Draw mode,number of coord pairs
  1281.                  dc.l Pairs2    Vector coordinate pairs
  1282.                  dc.l 0         Next border
  1283.  
  1284. Pairs2           dc.w 0,0       Lines which constitute the gadget
  1285.                  dc.w 20,0
  1286.                  dc.w 20,10
  1287.                  dc.w 10,10
  1288.                  dc.w 10,2
  1289.                  dc.w 8,4
  1290.                  dc.w 10,2
  1291.                  dc.w 12,4
  1292.                  dc.w 10,2
  1293.                  dc.w 10,10
  1294.                  dc.w 0,10
  1295.                  dc.w 0,0
  1296.  
  1297. Gadget3          dc.l Gadget4   Next gadget
  1298.                  dc.w 90        Left edge
  1299.                  dc.w -15       Top edge
  1300.                  dc.w 20        Width
  1301.                  dc.w 10        Height
  1302.                  dc.w 8         Flags
  1303.                  dc.w 1         Activation
  1304.                  dc.w 1         Gadget type
  1305.                  dc.l Border3   Rendered as border or image
  1306.                  dc.l 0         Select render
  1307.                  dc.l 0         ^Gadget text
  1308.                  dc.l 0         Mutual exclude
  1309.                  dc.l 0         Special info
  1310.                  dc.w 3         Gadget ID
  1311.                  dc.l 0         User data
  1312.  
  1313. Border3          dc.w 0         Left edge
  1314.                  dc.w 0         Top edge
  1315.                  dc.b 1,2       Front pen,back pen
  1316.                  dc.b 1,12      Draw mode,number of coord pairs
  1317.                  dc.l Pairs3    Vector coordinate pairs
  1318.                  dc.l 0         Next border
  1319.  
  1320. Pairs3           dc.w 0,0       Lines which constitute the gadget
  1321.                  dc.w 8,0
  1322.                  dc.w 8,6
  1323.                  dc.w 7,5
  1324.                  dc.w 10,8
  1325.                  dc.w 13,5
  1326.                  dc.w 12,6
  1327.                  dc.w 12,0
  1328.                  dc.w 20,0
  1329.                  dc.w 20,10
  1330.                  dc.w 0,10
  1331.                  dc.w 0,0
  1332.  
  1333. Gadget4          dc.l Gadget5   Next gadget
  1334.                  dc.w 130       Left edge
  1335.                  dc.w -15       Top edge
  1336.                  dc.w 20        Width
  1337.                  dc.w 10        Height
  1338.                  dc.w 8         Flags
  1339.                  dc.w 1         Activation
  1340.                  dc.w 1         Gadget type
  1341.                  dc.l Border4   Rendered as border or image
  1342.                  dc.l 0         Select render
  1343.                  dc.l 0         ^Gadget text
  1344.                  dc.l 0         Mutual exclude
  1345.                  dc.l 0         Special info
  1346.                  dc.w 4         Gadget ID
  1347.                  dc.l 0         User data
  1348.  
  1349. Border4          dc.w 0         Left edge
  1350.                  dc.w 0         Top edge
  1351.                  dc.b 1,2       Front pen,back pen
  1352.                  dc.b 1,12      Draw mode,number of coord pairs
  1353.                  dc.l Pairs4    Vector coordinate pairs
  1354.                  dc.l 0         Next border
  1355.  
  1356. Pairs4           dc.w 0,0       Lines which constitute the gadget
  1357.                  dc.w 20,0
  1358.                  dc.w 20,10
  1359.                  dc.w 12,10
  1360.                  dc.w 12,4
  1361.                  dc.w 13,5
  1362.                  dc.w 10,2
  1363.                  dc.w 7,5
  1364.                  dc.w 8,4
  1365.                  dc.w 8,10
  1366.                  dc.w 0,10
  1367.                  dc.w 0,0
  1368.  
  1369. Gadget5          dc.l Gadget6   Next gadget
  1370.                  dc.w 170       Left edge
  1371.                  dc.w -15       Top edge
  1372.                  dc.w 20        Width
  1373.                  dc.w 10        Height
  1374.                  dc.w 8         Flags
  1375.                  dc.w 1         Activation
  1376.                  dc.w 1         Gadget type
  1377.                  dc.l Border5   Rendered as border or image
  1378.                  dc.l 0         Select render
  1379.                  dc.l 0         ^Gadget text
  1380.                  dc.l 0         Mutual exclude
  1381.                  dc.l 0         Special info
  1382.                  dc.w 5         Gadget ID
  1383.                  dc.l 0         User data
  1384.  
  1385. Border5          dc.w 0         Left edge
  1386.                  dc.w 0         Top edge
  1387.                  dc.b 1,2       Front pen,back pen
  1388.                  dc.b 1,12      Draw mode,number of coord pairs
  1389.                  dc.l Pairs5    Vector coordinate pairs
  1390.                  dc.l 0         Next border
  1391.  
  1392. Pairs5           dc.w 0,0       Lines which constitute the gadget
  1393.                  dc.w 20,0
  1394.                  dc.w 20,10
  1395.                  dc.w 0,10
  1396.                  dc.w 0,5
  1397.                  dc.w 16,5
  1398.                  dc.w 14,4
  1399.                  dc.w 16,5
  1400.                  dc.w 14,6
  1401.                  dc.w 16,5
  1402.                  dc.w 0,5
  1403.                  dc.w 0,0
  1404.  
  1405. Gadget6          dc.l Gadget7   Next gadget
  1406.                  dc.w 210       Left edge
  1407.                  dc.w -15       Top edge
  1408.                  dc.w 20        Width
  1409.                  dc.w 10        Height
  1410.                  dc.w 8         Flags
  1411.                  dc.w 1         Activation
  1412.                  dc.w 1         Gadget type
  1413.                  dc.l Border6   Rendered as border or image
  1414.                  dc.l 0         Select render
  1415.                  dc.l 0         ^Gadget text
  1416.                  dc.l 0         Mutual exclude
  1417.                  dc.l 0         Special info
  1418.                  dc.w 6         Gadget ID
  1419.                  dc.l 0         User data
  1420.  
  1421. Border6          dc.w 0         Left edge
  1422.                  dc.w 0         Top edge
  1423.                  dc.b 1,2       Front pen,back pen
  1424.                  dc.b 1,12      Draw mode,number of coord pairs
  1425.                  dc.l Pairs6    Vector coordinate pairs
  1426.                  dc.l 0         Next border
  1427.  
  1428. Pairs6           dc.w 0,0       Lines which constitute the gadget
  1429.                  dc.w 20,0
  1430.                  dc.w 20,5
  1431.                  dc.w 4,5
  1432.                  dc.w 6,4
  1433.                  dc.w 4,5
  1434.                  dc.w 6,6
  1435.                  dc.w 4,5
  1436.                  dc.w 20,5
  1437.                  dc.w 20,10
  1438.                  dc.w 0,10
  1439.                  dc.w 0,0
  1440.  
  1441. Gadget7          dc.l Gadget8   Next gadget
  1442.                  dc.w 250       Left edge
  1443.                  dc.w -15       Top edge
  1444.                  dc.w 20        Width
  1445.                  dc.w 10        Height
  1446.                  dc.w 8         Flags
  1447.                  dc.w 1         Activation
  1448.                  dc.w 1         Gadget type
  1449.                  dc.l Border7   Rendered as border or image
  1450.                  dc.l 0         Select render
  1451.                  dc.l 0         ^Gadget text
  1452.                  dc.l 0         Mutual exclude
  1453.                  dc.l 0         Special info
  1454.                  dc.w 7         Gadget ID
  1455.                  dc.l 0         User data
  1456.  
  1457. Border7          dc.w 0         Left edge
  1458.                  dc.w 0         Top edge
  1459.                  dc.b 1,2       Front pen,back pen
  1460.                  dc.b 1,12      Draw mode,number of coord pairs
  1461.                  dc.l Pairs7    Vector coordinate pairs
  1462.                  dc.l 0         Next border
  1463.  
  1464. Pairs7           dc.w 0,0       Lines which constitute the gadget
  1465.                  dc.w 20,0
  1466.                  dc.w 20,10
  1467.                  dc.w 0,10
  1468.                  dc.w 0,6
  1469.                  dc.w 15,6
  1470.                  dc.w 14,7
  1471.                  dc.w 15,5
  1472.                  dc.w 14,3
  1473.                  dc.w 15,4
  1474.                  dc.w 0,4
  1475.                  dc.w 0,0
  1476.  
  1477. Gadget8          dc.l 0         Next gadget
  1478.                  dc.w 290       Left edge
  1479.                  dc.w -15       Top edge
  1480.                  dc.w 20        Width
  1481.                  dc.w 10        Height
  1482.                  dc.w 8         Flags
  1483.                  dc.w 1         Activation
  1484.                  dc.w 1         Gadget type
  1485.                  dc.l Border8   Rendered as border or image
  1486.                  dc.l 0         Select render
  1487.                  dc.l 0         ^Gadget text
  1488.                  dc.l 0         Mutual exclude
  1489.                  dc.l 0         Special info
  1490.                  dc.w 8         Gadget ID
  1491.                  dc.l 0         User data
  1492.  
  1493. Border8          dc.w 0         Left edge
  1494.                  dc.w 0         Top edge
  1495.                  dc.b 1,2       Front pen,back pen
  1496.                  dc.b 1,12      Draw mode,number of coord pairs
  1497.                  dc.l Pairs8    Vector coordinate pairs
  1498.                  dc.l 0         Next border
  1499.  
  1500. Pairs8           dc.w 0,0       Lines which constitute the gadget
  1501.                  dc.w 20,0
  1502.                  dc.w 20,4
  1503.                  dc.w 6,4
  1504.                  dc.w 7,3
  1505.                  dc.w 5,5
  1506.                  dc.w 7,7
  1507.                  dc.w 6,6
  1508.                  dc.w 20,6
  1509.                  dc.w 20,10
  1510.                  dc.w 0,10
  1511.                  dc.w 0,0
  1512.  
  1513.              end
  1514.  
  1515.